package com.jsh.erp.datasource.entities;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 发票表（jony_invoice）实体类
 *
 * 表名: jony_invoice
 * 描述: 该表用于存储开票信息，包括发票编号、发票类型、关联订单、客户/供应商信息、金额等相关数据。
 * 字段：
 * id - 发票主键
 * invoice_number - 发票编号
 * invoice_type - 发票类型（销售或采购）
 * customer_supplier_id - 客户或供应商ID
 * invoice_date - 开票日期
 * order_id - 关联订单ID
 * delivery_note_id - 出库单或入库单ID
 * report_no - 报关单号，仅限需要报关的场景
 * currency - 货币类型
 * subtotal - 未税金额总计
 * total_amount - 含税金额总计
 * created_by - 发票创建人
 * created_at - 创建时间
 * updated_at - 最后更新时间
 * invoice_account - 对应开票账户
 * invoice_remark - 开票备注
 *
 * @Author Yik
 * @Date 2025-01-08
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Invoice {

    private Long id;
    private String invoiceNumber;
    private String invoiceType;
    private Long customerSupplierId;
    private Date invoiceDate;
    private Long orderId;
    private String deliveryNoteId;
    private String reportNo;
    private String currency;
    private BigDecimal subtotal;
    private BigDecimal totalAmount;
    private String createdBy;
    private Date createdAt;
    private Date updatedAt;
    private Long invoiceAccount;
    private String invoiceRemark;
    private Long tenantId;
}
